package com.ruoyi.admin.domain.vo.request.atricle;

import com.ruoyi.admin.domain.entity.AtricleModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import org.springframework.beans.BeanUtils;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;


/**
 * 货号表添加参数实体
 *
 * @author jianhan
 * @date 2023-01-31 10:49:28
 */
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class AtricleAddRequest {

    @ApiModelProperty(value = "货号", required = true)
    private String articleNumber;

    @ApiModelProperty(value = "码数", required = true)
    private String size;

    @ApiModelProperty(value = "条形码", required = true)
    private String barCode;

    @ApiModelProperty(value = "图片地址", required = true)
    private String picture;

    @ApiModelProperty(value = "备注", required = true)
    private String remark;

    @ApiModelProperty(value = "品牌id", required = true)
    private Long brandId;

    @ApiModelProperty(value = "品类id", required = true)
    private Long categoryId;

    /**
     * 获取实体对象
     *
     * @return 对象
     * @author jianhan
     * @date 2023-01-31 10:49:28
     **/
    @ApiModelProperty(hidden = true)
    public AtricleModel getAtricleModel() {
        AtricleModel atricleModel = new AtricleModel();
        BeanUtils.copyProperties(this, atricleModel);
        return atricleModel;
    }

}
